﻿
// Condition: 10. Write a program to calculate n! for each n in the range [1..100]. 

using System;
using System.Numerics;



class Factorial
{
    // method that calculate factorial using loop
    static BigInteger Calculation(int number)
    {
        BigInteger nFactorial = 1;

        for (int i = 1; i <= number; i++)
        {
            nFactorial *= i;
        }

        return nFactorial;
    }


    static void Main(string[] args)
    {
        // enter element 
        Console.Write("Enter n in range [1 - 100] to calculate n!: ");
        int n = int.Parse(Console.ReadLine());

        // print the result
        Console.WriteLine("The factorial of n= {0} is: {1}",n,Calculation(n));
    }
}

